home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 February
/
Macworld (1999-02).dmg
/
Games World
/
Hot Demos!
/
DroidWorks demo
/
dwCD.gob
/
mission_cog_inv_batteryl.cog
< prev
next >
Wrap
Text File
|
1998-09-17
|
790b
|
43 lines
# DroidWorks
# Battery item cog
#
# Each battery supplies 1000 power units
#
# Battery is in inventory bin 18
# Power is in inventory bin 20
symbols
thing player
message activated
sound batteryActivate=NRG00tBattUse.wav
end
# ========================================================================================
code
activated:
player = GetSourceRef();
if (GetInv(player, 18) > 0)
{
if (GetInv(player, 20) < GetInvMax(player, 20))
{
print("using large battery");
if (dwcheckDroidCaps(1048576)!=0) dwplayplayerspeech("", 512);
PlaySoundlocal(batteryActivate, 1.0, 0.0, 0);
ChangeInv(player, 20, 6000);
ChangeInv(player, 18, -1);
if(GetInv(player, 18) == 0) SetInvAvailable(player, 18, 0);
}
}
return;
end